<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.util.Date"%>
<%@ page import="cn.ainit.sys.menu.SessionCont"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    	<link rel="stylesheet" href="${pageContext.request.contextPath}/css/ainit.css" type="text/css"></link>
		<link rel="stylesheet" href="../printCss/print.css" type="text/css"></link>
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/sysPrint/printCss/print.css" />
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.4.4.min.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/My97DatePicker/WdatePicker.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.easyui.min.1.2.2.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/locale/easyui-lang-zh_CN.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.json-2.4.min.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.ainit-1.0.0.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/model/js/jquery.ainit-1.1.0.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/model/js/model.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/model/js/perlize.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/model/js/save.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/model/js/initPage.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/sysReport/report.js"></script>
		<script type="text/javascript">
			$(function() {
				$("#dotted :last ").remove()
			});
		</script>
		        <script type="text/javascript">
        window.onload=function name(){
          window.print();
          window.close();
    }
     </script> 
		<style>
			table {table-layout:fixed; word-break: break-all; word-wrap: break-word; } 
		</style>
	</head>
	<body>
		<table cellpadding="0.5" cellspacing="2" width="740px"
			style="margin: 6px;">
			<tr>
				<th colspan="8"
					style="font-size: 20px; height: 32px;">
					${Company.COM_PRINTNAME}对账结算单
				</th>
			</tr>
			<tr>
				<td>
					<strong>客户编码:</strong>
				</td>
				<td colspan="5">
					<strong>${data.CLIENTS_NO}</strong>
				</td>
			</tr>
			<tr>
				<td width="80px">
					<strong>客户编码:</strong>
				</td>
				<td colspan="7">
					<strong>${data.CLIENTS_NO}</strong>
				</td>
			</tr>
			<tr>
				<td width="80px">
					<strong>客户名称:</strong>
				</td>
				<td colspan="2" width="100px">
					${data.CLIENTS_NAME}
				</td>
				<td width="100px" align="right">
					<strong>打印日期:</strong>
				</td>
				<td width="120px">
					<jsp:useBean id="now" class="java.util.Date" scope="page" />
					<fmt:formatDate value="${now}" pattern="yyyy-MM-dd" />
				</td>
				<td>
					<strong>结算日期:</strong>
				</td>
				<td width="120px">
					${data.JS_MONTH}
				</td>
			</tr>
			<tr>
				<td colspan="8">
					&nbsp;
				</td>
			</tr>
			<tr>
				<td colspan="8">
					<hr width=810px align="left" />
				</td>
			</tr>
			<tr height="12px">
				<td width="60px" style="line-height: 12px" align="center">
					<strong>序号</strong>
				</td>
				<td width="80px" style="line-height: 12px" align="center">
					<strong>录入日期</strong>
				</td>
				<td width="120px" style="line-height: 12px" align="center">
					<strong>凭证单号</strong>
				</td>
				<td style="line-height: 12px" align="center">
					<strong>码洋</strong>
				</td>
				<td width="60px" style="line-height: 12px" align="center">
					<strong>折扣</strong>
				</td>
				<td width="60px" style="line-height: 12px" align="center">
					<strong>实洋</strong>
				</td>
				<td width="200px" style="line-height: 12px" colspan="2" align="left">
					<strong>备注</strong>
				</td>
			</tr>
			<tr height="12px">
				<td colspan="8">
					<hr width=810px align="left" />
				</td>
			</tr>
			<c:forEach items="${dataList}" var="temp">
					<tr height="12px">
						<td width="60px" style="line-height: 12px" align="center">
							<div style="width:60px;line-height:12px">
								${temp.ROWNUM}
							</div>
						</td>
						<td width="80px" style="line-height: 12px" align="left">
							<div style="width:80px;line-height:12px">
								${temp.YW_INPUT_DATE}
							</div>
						</td>
						<td width="120px" style="line-height: 12px" align="left">
							<div style="width:180px;line-height:12px">
								${temp.YW_CODE}
							</div>
						</td>
						<td style="line-height: 12px" align="center">
							<div style="line-height:12px">
								${temp.TOTAL_MONEY}
							</div>
						</td>
						<td width="60px" style="line-height: 12px" align="center">
							<div style="width:60px;line-height:12px">
								${temp.C_DISCOUNT}
							</div>
						</td>
						<td width="60px" style="line-height: 12px" align="center">
							<div style="width:60px;line-height:12px">
								${temp.REAL_MONEY}
							</div>
						</td>
						<td width="200px" style="line-height: 12px" colspan='2' align="left">
							<div style="max-width: 200px; min-width: 45px; min-height: 12px; max-height: 36px;">
								${temp.YW_MEMO}
							</div>
						</td>
					</tr>
					<tr id="dotted">
						<td colspan="8">
							<hr width=810px align="left" style="border: 1px dotted;" />
						</td>
					</tr>
			</c:forEach>
			<tr>
				<td colspan="8">
					<hr width=810px align="left" />
				</td>
			</tr>
			<tr>
				<td colspan="8">
					<b>总欠款：${data.THIS_ZYS}</b>
				</td>
			</tr>
		<tr>
				<td colspan="8">
					<hr width=810px align="left" />
				</td>
			</tr>
			<tr>
				<td colspan="8">
					<b>业务联系方式</b>
				</td>
			</tr>
			<tr>
				<td>
					<strong>电话:</strong>
				</td>
				<td width="220px" colspan="2">
					${data.O_TELPHONE}
				</td>
				<td>
					<strong>联系人:</strong>
				</td>
				<td width="220px" colspan="2" >
					${data.o_name}
					<c:if test="${not empty data.O_TELPHONE2}">(分机:${data.o_telphone2 })</c:if>
				</td>
			</tr>
			<tr>
				<td>
					<strong>传真:</strong>
				</td>
				<td width="220px" colspan="2">
					${data.C_FAX}
				</td>
				<td>
					<strong>对账:</strong>
				</td>
				<td width="220px" colspan="2">
					${data.O_NAME}
					<c:if test="${not empty data.O_TELPHONE2}">(分机:${data.O_TELPHONE2})</c:if>
				</td>
			</tr>
			<tr>
				<td colspan="8">
					<b>财务资料</b>
				</td>
			</tr>
			<tr>
				<td>
					<strong>户名:</strong>
				</td>
				<td width="226x" style="padding-left: 0px" colspan="3">
					${Company.ACCOUNT_NAME1}
				</td>
			</tr>
			<tr>
				<td>
					<strong>开户行:</strong>
				</td>
				<td width="230px" colspan="2">
					${Company.ACCOUNT_BANK1}
				</td>
				<td style="padding-left: 25px">
					<strong>账号:</strong>
				</td>
				<td width="240px" colspan="2">
					${Company.ACCOUNT_NO1}
				</td>
			</tr>
			<tr>
				<td colspan="8">
					<b>退货地址</b>
				</td>
			</tr>
			<tr>
				<td>
					<strong>北京市:</strong>
				</td>
				<td width="280px">
					${Company.STOCK_ADDRESS}
				</td>
				<td style="padding-left: 25px">
					<strong>电话:</strong>
				</td>
				<td width="200px" colspan="2">
					<div
						style="max-width: 200px; min-width: 200px; min-height: 12px; max-height: 48px;">
						${Company.STOCK_TEL}
					</div>
				</td>
				<td style="padding-left: 25px">
					<strong>邮编:</strong>
				</td>
				<td width="190px" colspan="2">
					${Company.STOCK_ZIP}
				</td>
			</tr>
			<tr>
				<td colspan="8">
					<b>对账信息（请盖章并回传）</b>
				</td>
			</tr>
			<tr>
				<td colspan="8" align="right">
					<span style="font-size: 11px; color: #9BA4AF">技术支持:</span>
					<span style="font-size: 12px; color: #9BA4AF">上海爱你特科技www.ainit.cn</span>
				</td>
			</tr>
		</table>
	</body>
</html>